package com.dream.testtubebaby.adapter;

import java.util.List;

import android.content.Context;

import com.dream.testtubebaby.R;
import com.dream.testtubebaby.data.AttentionItem;
import com.dream.testtubebaby.utils.ViewHolder;

public class MyAttentionListAdapter extends CommonAdapter<AttentionItem> {

	public MyAttentionListAdapter(Context context, List<AttentionItem> mDatas,
			int itemLayoutId) {
		super(context, mDatas, itemLayoutId);
	}

	public void setDatas(List<AttentionItem> mDatas) {
		this.mDatas.clear();
		this.mDatas.addAll(mDatas);
	}

	public void addAll(List<AttentionItem> mDatas) {
		this.mDatas.addAll(mDatas);
	}
	
	@Override
	public void convert(final ViewHolder helper, final AttentionItem item) {
		helper.setText(R.id.attention_doctor_name_tv, item.getDoctorname());
//		CharSequence time_string = DateUtils.getRelativeTimeSpanString(
//				item.getTime(), System.currentTimeMillis(),
//				DateUtils.MINUTE_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE);
//
//		helper.setText(R.id.chat_time_tv, time_string.toString());
//		helper.setText(R.id.chat_content_tv, item.getContent());
	}
}
